POV-Ray : Newsgroups : povray.general : Tutorial for macros and arrays? : Re: Tutorial for macros and arrays? Server Time
13 Aug 2024 01:19:52 EDT (-0400)
  Re: Tutorial for macros and arrays?  
From: Nieminen Mika
Date: 10 Dec 1998 06:22:34
Message: <366faefa.0@news.povray.org>
David Etter Perere <per### [at] infomaniakch> wrote:
: It's the purpose of arrays and macros that I don't understand.

  Instead of making something like this:

#while(A<...)
  #while(B<...)
    #declare PosX=A
    #declare PosY=B
    #declare Height=#include "function.inc"
    sphere { <A,Height,B>,1 }
  ...

you can make this:

#while(A<...)
  #while(B<...)
    sphere { <A,function(A,B),B>,1 }
  ...

  'function' could also be an array instead of a macro.

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.